-- GENERATED SPELL FOR [Floon] --


function spell0_18588(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_18588', 8260, 1)
end

function spell1_18588(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18588', 7000, 1)
end

function spell2_18588(pUnit, Event) --@Silence,n/a--
pUnit:FullCastSpellOnTarget(6726,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18588', 5275, 1)
end

function Sorts_18588(pUnit, Event)
local choix_sorts_18588 = math.random(0, 2)
if choix_sorts_18588 == 0 then
pUnit:RegisterEvent('spell0_18588', 1, 1)
end
if choix_sorts_18588 == 1 then
pUnit:RegisterEvent('spell1_18588', 1, 1)
end
if choix_sorts_18588 == 2 then
pUnit:RegisterEvent('spell2_18588', 1, 1)
end
end

function mob18588_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18588', math.random(1500, 3000), 1)
end

function mob18588_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18588_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18588_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18588, 1, 'mob18588_Action')
RegisterUnitEvent(18588, 2, 'mob18588_Leave')
RegisterUnitEvent(18588, 3, 'mob18588_Kill')
RegisterUnitEvent(18588, 4, 'mob18588_Die')
